﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CloudDcPc.Entity
{
    public class Tab
    {
        public string TextStatus
        {
            get
            {
                switch (Status)
                {
                    case 1: return "空闲";
                    case 2: return "预订";
                    case 3: return "使用中";
                    case 4: return "维修";
                    default: return "未知";
                }
            }
            set
            {
                switch (value)
                {
                    case "空闲": Status = 1; break;
                    case "预订": Status = 2; break;
                    case "使用中": Status = 3; break;
                    case "维修": Status = 4; break;
                }
            }
        }

        public override string ToString()
        {
            return Name;
        }

        private int wait;
        public int Wait
        {
            get { return wait; }
            set { wait = value; }
        }

        public string TextWait
        {
            get
            {
                switch (Wait)
                {
                    case 1: return "等台桌";
                    case 0: return "普通桌";                  
                    default: return "未知";
                }
            }
            set
            {
                switch (value)
                {
                    case "等台桌": Wait = 1; break;
                    case "普通桌": Wait = 0; break;
                }
            }
        }

        private int id;

        public int Id
        {
            get { return id; }
            set { id = value; }
        }
        private int tab_num;

        public int Tab_num
        {
            get { return tab_num; }
            set { tab_num = value; }
        }
        private string name;

        public string Name
        {
            get { return name; }
            set { name = value; }
        }
        private int size;

        public int Size
        {
            get { return size; }
            set { size = value; }
        }
        private int status;

        public int Status
        {
            get { return status; }
            set { status = value; }
        }

    }
}
